import yagmail
import logging
from BeautifulReport import BeautifulReport
import unittest
class Tools():
    def Log(self):
        logging.basicConfig(level=logging.DEBUG, format='%(filename)s %(message)s %(levelname)s %(asctime)s ',filename='music.log', filemode='a+')

    # def baogao(suite):
    #     BeautifulReport(suite).report(filename="bao.html",description='网易云测试',report_dir='.')
    def send_email(self,name):
        emaile = yagmail.SMTP(user="zaqmlp13485456209@qq.com", password="yhvqkqhdymhgdbbc", host="smtp.qq.com")
        emaile.send(to="zaqmlp13485456209@qq.com", subject="测试", contents=["shop.html","202571data.log"], attachments=name)
        emaile.close()
